package com.example.prom.ok.y2022.enums;

/**
 *  NON-NLS
 */
public enum TemplateModuleEnum {

    USER(2022,"users"),
    ASSET(2028, "assets"),
    AIRCRAFT(2031,"aircraft"),
    SUPPORT(2033,"supports"),
    OTC(2032,"otc"),
    FINANCIAL(2030,"financial"),
    OTHER(0,"other");


    private int nodeId;
    private String moduleName;

    TemplateModuleEnum(int nodeId, String moduleName) {
        this.nodeId = nodeId;
        this.moduleName = moduleName;
    }

    public int getNodeId() {
        return nodeId;
    }

    public String getModuleName() {
        return moduleName;
    }

    public static String getModuleNameByNodeId(int nodeId){
        for (TemplateModuleEnum templateModuleEnum : TemplateModuleEnum.values()) {
            if(templateModuleEnum.nodeId == nodeId){
                return templateModuleEnum.getModuleName();
            }
        }
        return "";
    }
}
